package com.ruoyi.system.service.impl;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.system.entity.PreventionContingencyDisposeFile;
import com.ruoyi.system.mapper.PreventionContingencyDisposeFileMapper;
import com.ruoyi.system.service.PreventionContingencyDisposeFileService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * <p>
 * 应急处置卡附件表 服务实现类
 * </p>
 * @since 2023-03-14
 */
@Service("preventionContingencyDisposeFileService")
public class PreventionContingencyDisposeFileServiceImpl implements PreventionContingencyDisposeFileService {

    @Resource
    private PreventionContingencyDisposeFileMapper preventionContingencyDisposeFileMapper;


    @Override
    public PreventionContingencyDisposeFile queryById(Integer id) {
        return this.preventionContingencyDisposeFileMapper.queryById(id);
    }

    @Override
    public PreventionContingencyDisposeFile insert(PreventionContingencyDisposeFile promiseFile) {
        promiseFile.setCreateUser(SecurityUtils.getUsername());
        this.preventionContingencyDisposeFileMapper.insert(promiseFile);
        return promiseFile;
    }
}
